package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.domain.WorkerCertificationAudit;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.service.IWorkerCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.undertow.util.BadRequestException;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description WorkerCertificationAuditController
 * @Author liujiangyuan
 * @Date 2024-12-03-14:16
 */
@RestController("workerCertificationAuditController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 实名认证相关接口")
public class WorkerCertificationAuditController {
    @Resource
    private IWorkerCertificationAuditService iWorkerCertificationAuditService;
    @PostMapping
    @ApiOperation("实名认证审核")
    public void auditcertification(@RequestBody WorkerCertificationAudit workerCertificationAudit) throws BadRequestException {
        iWorkerCertificationAuditService.auditcertification(workerCertificationAudit);
    }
    @GetMapping("/rejectReason")
    @ApiOperation("查询失败原因")
    public CertificationAuditReqDTO rejectionReason()  {
        return iWorkerCertificationAuditService.rejectionReason();
    }
}
